package com.hd.sup.modules.vehicle.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author chentl123
 * @since 2020-12-28
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sp_vehicle_alarm_daily_statis")
public class VehicleAlarmDailyStatis extends Model<VehicleAlarmDailyStatis> {

    private static final long serialVersionUID = 1L;

    //列表查询构造
    public VehicleAlarmDailyStatis(String platNo, String enterpriseNo, String enterpriseName, String regionCode, String startDateStr, String endDateStr, String dateRange, String sort, String order) {
        this.platNo = platNo;
        this.enterpriseNo = enterpriseNo;
        this.enterpriseName = enterpriseName;
        this.regionCode = regionCode;
        this.startDateStr = startDateStr;
        this.endDateStr = endDateStr;
        this.dateRange = dateRange;
        this.sort = sort;
        this.order = order;
    }

    //趋势查询构造
    public VehicleAlarmDailyStatis(String platNo, String platNoColor, String startDateStr, String endDateStr, String dateRange) {
        this.platNo = platNo;
        this.platNoColor = platNoColor;
        this.startDateStr = startDateStr;
        this.endDateStr = endDateStr;
        this.dateRange = dateRange;
    }

    /**
     * 业务id
     */
    private String id;
    /**
     * 车牌号
     */
    @TableField("plat_no")
    private String platNo;
    /**
     * 车牌颜色
     */
    @TableField("plat_no_color")
    private String platNoColor;
    /**
     * 车辆类型
     */
    @TableField("vehicle_type")
    private String vehicleType;
    /**
     * 运输类型
     */
    @TableField("trans_type")
    private String transType;
    /**
     * 报警总数
     */
    @TableField("alarm_sum")
    private Integer alarmSum;
    /**
     * 企业编码
     */
    @TableField("enterprise_no")
    private String enterpriseNo;
    /**
     * 企业名称
     */
    @TableField("enterprise_name")
    private String enterpriseName;
    /**
     * 报警类型
     */
    @TableField("alarm_type")
    private String alarmType;
    /**
     * 行政编码
     */
    @TableField("region_code")
    private String regionCode;
    /**
     * 统计日期
     */
    @TableField("statis_date")
    private Date statisDate;
    /**
     * 筛选开始时间
     */
    @TableField(exist = false)
    private String startDateStr;
    /**
     * 筛选结束时间
     */
    @TableField(exist = false)
    private String endDateStr;

    @TableField(exist = false)
    private String dateStr;

    /**
     * 日期范围
     */
    @TableField(exist = false)
    private String dateRange;
    /**
     * 组织机构id
     */
    @TableField("dept_id")
    private String deptId;


    @TableField(exist = false)
    private String sort;
    @TableField(exist = false)
    private String order;

    @TableField(exist = false)
    private String timeFrame;
    @TableField(exist = false)
    private Integer limit;
    @TableField(exist = false)
    private Integer paragraphs;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
